<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
	<?php
require_once("../../conn/conn_db.php");   //包含数据库连接文件
//获取传递的订单编号和操作类型
if($_GET['ct_id']!= "" &&  $_GET["Type"]!= "")
{
    $onum = $_GET['ct_id'];
    $type = $_GET["Type"];     
    $sql =""; 
    switch ($type)
    {
        case "2":
            $sql = "update contact set status='2' where ct_id='$onum'";  //更新语句
            break;
    }
    $i = $conn->query($sql); //执行SQL语句
    if($i)                  //判断执行结果
    {
        echo "<script>alert('操作成功！');self.location='../contact_manager.php'</script>";
    }
    else
    {
        echo "<script>alert('操作失败！');self.location='../contact_manager.php'</script>";
    }
}
else
{
    echo "<script>alert('请重新选择要操作的信息！');self.location='../contact_manager.php'</script>";
}
?>
</body>
</html>